From: Felix Fietkau Date: Fri, 6 May 2016 09:14:04 +0000 (+0100) Subject: Use --delay-updates on rsync upload to minimize time of inconsistency in the repo X-Git-Tag: v1~274 X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22http:/www.crowdsec.net/%22/%22https:/collectd.org/%22http:/www.crowdsec.net/%22?a=commitdiff_plain;h=a897c385ba837275d2c36ea48ff1b37406e0d186;p=buildbot.git Use --delay-updates on rsync upload to minimize time of inconsistency in the repo During the rsync operation, package lists could go out of sync with the .ipk files, or a mirror might be pulling an incomplete list of files. To reduce the chance of this happening, let rsync put all updated files into place at the end of the transfer Signed-off-by: Felix Fietkau --- diff --git a/phase1/master.cfg b/phase1/master.cfg index 4a99013..e9e9556 100644 --- a/phase1/master.cfg +++ b/phase1/master.cfg @@ -412,7 +412,7 @@ EOT''' %(ts[0], ts[0], ts[1]) )) factory.addStep(ShellCommand( name = "targetupload", description = "Uploading target files", - command=["rsync", "--delete", "-avz", "bin/targets/%s/%s/" %(ts[0], ts[1]), "%s/targets/%s/%s/" %(rsync_url, ts[0], ts[1])], + command=["rsync", "--delete", "--delay-updates", "-avz", "bin/targets/%s/%s/" %(ts[0], ts[1]), "%s/targets/%s/%s/" %(rsync_url, ts[0], ts[1])], env={'RSYNC_PASSWORD': rsync_key}, haltOnFailure = True, logEnviron = False @@ -422,7 +422,7 @@ EOT''' %(ts[0], ts[0], ts[1]) )) factory.addStep(ShellCommand( name = "packageupload", description = "Uploading package files", - command=["rsync", "--delete", "-avz", "bin/packages/", "%s/packages/" %(rsync_url)], + command=["rsync", "--delete", "--delay-updates", "-avz", "bin/packages/", "%s/packages/" %(rsync_url)], env={'RSYNC_PASSWORD': rsync_key}, haltOnFailure = False, logEnviron = False @@ -433,7 +433,7 @@ EOT''' %(ts[0], ts[0], ts[1]) )) factory.addStep(ShellCommand( name = "upload", description = "Uploading logs", - command=["rsync", "--delete", "-avz", "logs/", "%s/logs/%s/%s/" %(rsync_url, ts[0], ts[1])], + command=["rsync", "--delete", "--delay-updates", "-avz", "logs/", "%s/logs/%s/%s/" %(rsync_url, ts[0], ts[1])], env={'RSYNC_PASSWORD': rsync_key}, haltOnFailure = False, alwaysRun = True, diff --git a/phase2/master.cfg b/phase2/master.cfg index 0ad5f36..41d50c8 100644 --- a/phase2/master.cfg +++ b/phase2/master.cfg @@ -204,7 +204,7 @@ for arch in arches: name = "packageupload", description = "Uploading package files", workdir = "build/sdk", - command = ["rsync", "--delete", "-avz", "bin/packages/%s/" %(arch[0]), "%s/packages/%s/" %(rsync_url, arch[0])], + command = ["rsync", "--delete", "--delay-updates", "-avz", "bin/packages/%s/" %(arch[0]), "%s/packages/%s/" %(rsync_url, arch[0])], env={'RSYNC_PASSWORD': rsync_key}, haltOnFailure = True, logEnviron = False @@ -240,7 +240,7 @@ for arch in arches: name = "logupload", description = "Uploading failure logs", workdir = "build/sdk", - command = ["rsync", "--delete", "-avz", "faillogs/", "%s/faillogs/%s/" %(rsync_url, arch[0])], + command = ["rsync", "--delete", "--delay-updates", "-avz", "faillogs/", "%s/faillogs/%s/" %(rsync_url, arch[0])], env={'RSYNC_PASSWORD': rsync_key}, haltOnFailure = False, logEnviron = False